﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Suppliers : System.Web.UI.Page
{
    Connectdbnour con = new Connectdbnour();
    protected void Page_Load(object sender, EventArgs e)
    {
        
        
    }

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        
    }
    protected void Button3_Click(object sender, EventArgs e)
    {

    }
    protected void Button1_Click1(object sender, EventArgs e)
    {
        GlobalClass.Name = DropDownList1.SelectedItem.ToString();
        GlobalClass.ShowDate = DropDownList2.SelectedItem.ToString() + "-" + DropDownList3.SelectedItem.ToString() + "-" + DropDownList4.SelectedItem.ToString();
        GlobalClass.Date = DropDownList3.SelectedItem.ToString() + "-" + DropDownList2.SelectedItem.ToString() + "-" + DropDownList4.SelectedItem.ToString();
        GlobalClass.Unit = TextBox1.Text;
        GlobalClass.Bill = TextBox2.Text;
        GlobalClass.Discount = TextBox3.Text;
        GlobalClass.Brandlens = DropDownList5.SelectedItem.ToString();
        GlobalClass.Brandsoln = DropDownList6.SelectedItem.ToString();
        GlobalClass.Brandaccs = DropDownList7.SelectedItem.ToString();
        GlobalClass.Unitone = TextBox4.Text;
        GlobalClass.Unittwo = TextBox5.Text;
        GlobalClass.Unitthree = TextBox6.Text;
        Response.Redirect("Suppliers.aspx");
    }
    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (RadioButtonList1.SelectedItem.ToString() == "Lens")
        {
            DropDownList15.Enabled = false;
        }
        else if (RadioButtonList1.SelectedItem.ToString() == "Box")
        {
            DropDownList15.Enabled = true;
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        GlobalClass.VD = DropDownList14.SelectedItem.ToString();
        GlobalClass.Color = DropDownList8.SelectedItem.ToString();
        GlobalClass.Sph = DropDownList9.SelectedItem.ToString(); ;
        GlobalClass.Cyl = DropDownList10.SelectedItem.ToString(); ;
        GlobalClass.Axis = DropDownList11.SelectedItem.ToString(); ;
        GlobalClass.Bc = DropDownList12.SelectedItem.ToString(); ;
        GlobalClass.Diam = DropDownList13.SelectedItem.ToString(); ;
        GlobalClass.Lot = TextBox7.Text;
        GlobalClass.Exdate = DropDownList18.SelectedItem.ToString() + "-" + DropDownList17.SelectedItem.ToString() + "-" + DropDownList16.SelectedItem.ToString();
        if (RadioButtonList1.SelectedItem.ToString() == "Lens")
        {
            GlobalClass.Pck = "1";
        }
        else if (RadioButtonList1.SelectedItem.ToString() == "Box")
        {
            GlobalClass.Pck = DropDownList15.SelectedItem.ToString();
        }
    }
}